<template>
	<view class="store_deta">
		<image :src="cover"></image>
		<view class="show_view">
			<view class="name">{{name}}</view>
			<view class="value">{{synopsis}}</view>
		</view>
	</view>
</template>

<script>
	import {
		productInfo
	} from '@/request/api.js';
	export default {
		props: {
			id: {
				type: [Number, String],
				default: ""
			}
		},
		data() {
			return {
				cover: "",
				name: "",
				synopsis: "",
			}
		},
		async created() {
			let {
				info
			} = await productInfo({
				id: this.id
			});
			this.cover = info.cover;
			this.name = info.name;
			this.synopsis = info.synopsis;
		}
	}
</script>

<style scoped lang="scss">
	.store_deta {
		width: 500rpx;
		min-height: 150rpx;
		padding: 4rpx;
		box-sizing: border-box;
		background: rgba(0, 0, 0, 0.5);
		display: flex;

		image {
			width: 130rpx;
			height: 130rpx;
		}

		.show_view {
			flex: 1;
			padding-left: 30rpx;
			padding-top: 22rpx;
			box-sizing: border-box;

			.name {
				color: #FFFFFF;
				font-size: 36rpx;
				font-weight: 400;
				font-family: SimSun;
				margin-bottom: 24rpx;
			}

			.value {
				color: #CCCCCC;
				font-size: 28rpx;
				font-weight: 400;
				font-family: SimSun;
			}
		}
	}
</style>